					<div class="product">
                    	<?
							$sanpham_chungloai = $t->get_by_thutu("sanpham_chungloai",$dd,1);
							$row_cl=mysql_fetch_assoc($sanpham_chungloai);
							if($row_cl['ten_'.$lang]=='') $row_cl['ten_'.$lang]='-';
							
							$sanpham_root = $t->get_by_thutu("sanpham_root",$row_cl['idroot'],1);
							$row_root=mysql_fetch_assoc($sanpham_root);
							if($row_root['ten_'.$lang]=='') $row_root['ten_'.$lang]='-';
							
							$menu=$t->get_by_thutu("sanpham_menu",$row_cl['idmenu']);
							$row_menu=mysql_fetch_assoc($menu);
							if($row_menu['ten_'.$lang]=='') $row_menu['ten_'.$lang]='-';
						?>
						<div class="url_top">
							<a href="<?=$rooturl?><?=$list['1']['alias'];?>.html"><?=$list['1']['ten_'.$lang];?></a> > 
                            <a href="<?=$rooturl?><?=$list['13']['alias'];?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>-<?=$row_root['id']?>.html"><?php echo $row_root['ten_'.$lang]; ?></a> >
                            <a href="<?=$rooturl?><?=$list['12']['alias'];?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_cl['ten_'.$lang])?>-<?=$row_cl['id']?>.html"><?=$row_cl['ten_'.$lang]; ?></a>
						</div>
                        <?
							$sanpham_loai = $t->get_by_thutu("sanpham_loai",-1,1," AND idcl=".$row_cl['id']);
							if (mysql_numrows($sanpham_loai)>0) {
								while($row_l=mysql_fetch_assoc($sanpham_loai)){
									if($row_l['ten_'.$lang]=='') $row_l['ten_'.$lang]='-';
						?>
						<div class="list_record1">
							<label> <a href="<?=$rooturl?><?=$list['14']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_cl['ten_'.$lang])?>/<?=convert($row_l['ten_'.$lang])?>-<?=$row_l['id']?>.html"><?=$row_l['ten_'.$lang]?></a> <span><a href="<?=$rooturl?><?=$list['14']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_cl['ten_'.$lang])?>/<?=convert($row_l['ten_'.$lang])?>-<?=$row_l['id']?>.html">>> Xem tiếp</a></span> </label>
							<ul>
                            	<?
									$i=0;
									$sanpham = $t->get_by_order("sanpham",-1,1," AND idloai='".$row_l['id']."'"." order by id desc LIMIT 0,12");
									while($row_sp=mysql_fetch_assoc($sanpham)){
										$i++;
										$images = explode(':*:',$row_sp['url_img']);
								?>
								<li <? if ($i==1 || $i%7==0) { echo "class='top'"; } ?>>
									<table cellpadding="0" cellspacing="0">
										<tr>
											<td>
                                    <a title="<?=$row_sp['ten_'.$lang]?>" href="<?=$rooturl?><?=$list['15']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_chungloai['ten_'.$lang])?>/<?=convert($row_loai['ten_'.$lang])?>/<?=convert($row_sp['ten_'.$lang])?>-<?=$row_sp['id']?>.html">
										<img src="<?=getUrlThumbnail($images[0])?>" />
									</a>
                                    		</td>
                                    	</tr>
                                    </table>
									<br/>
									<a href="<?=$rooturl?><?=$list['15']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_chungloai['ten_'.$lang])?>/<?=convert($row_loai['ten_'.$lang])?>/<?=convert($row_sp['ten_'.$lang])?>-<?=$row_sp['id']?>.html">
										<?=$row_sp['code']?>
									</a>
									<br/>
									<?php if ($row_sp['gia'] == 0): ?>
					                    <span style="">Call 08 6652 9957</span>
					                <?php else: ?>
					                    <span style=""><?=number_format($row_sp['gia'],0,".",",")?></span>
					                <?php endif ?>
								</li>
								<?
									}
								?>
							</ul>
						</div>
                        <?
								}
							}else {
						?>
                        <div class="list_record">
							<ul>
								<?
									$i=0;
									$sanpham = $t->get_by_thutu("sanpham",-1,1," AND idcl=".$row_cl['id']);
									while($row_sp=mysql_fetch_assoc($sanpham)){
									$images = explode(':*:',$row_sp['url_img']);
										$i++;
								?>
								<li <? if ($i==1 || $i%7==0) { echo "class='top'"; } ?>>
                                	<table cellpadding="0" cellspacing="0">
										<tr>
											<td>
									<a href="<?=$rooturl?><?=$list['15']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_chungloai['ten_'.$lang])?>/<?=convert($row_loai['ten_'.$lang])?>/<?=convert($row_sp['ten_'.$lang])?>-<?=$row_sp['id']?>.html">
										<img src="<?=getUrlThumbnail($images[0])?>" />
									</a>
                                    		</td>
                                    	</tr>
                                    </table>
									<br/>
									<a href="<?=$rooturl?><?=$list['15']['alias']?>/<?=convert($row_menu['ten_'.$lang])?>/<?=convert($row_root['ten_'.$lang])?>/<?=convert($row_chungloai['ten_'.$lang])?>/<?=convert($row_loai['ten_'.$lang])?>/<?=convert($row_sp['ten_'.$lang])?>-<?=$row_sp['id']?>.html">
										<?=$row_sp['code']?>
									</a>
									<br/>
									<?php if ($row_sp['gia'] == 0): ?>
					                    <span style="">Call 08 6652 9957</span>
					                <?php else: ?>
					                    <span style=""><?=number_format($row_sp['gia'],0,".",",")?></span>
					                <?php endif ?>
								</li>
								<?
									}
								?>
							</ul>
						</div>
                        <?
							}
						?>
					</div>